/*
 * common.h
 *
 *  Created on: Dec 1, 2012
 *      Author: hxin
 */

#ifndef COMMON_H_
#define COMMON_H_

#include <iostream>
#include <string>

using namespace std;

template<class T>
void makeProgress(string jobName, T curProgress, const T fullSize,
		const T granularity) {
	if (curProgress % granularity == 0) {
		cerr << '\r' << jobName << ": "
				<< (unsigned int) ((double) curProgress / fullSize * 100) << "%"
				<< "\tcurProgress: " << curProgress << "    ";
		cerr.flush();
		//curProgress = 0;
	}
}

struct keyStruct {
	int key_entry_size;
	int original_order;
};

enum type_config {FAKE_ALIGN_BASE, FAKE_ALIGN_2LV, FAKE_ALIGN_HET};

extern type_config aligner_config;

extern type_config analyser_config;

extern int _g_KmerLength;

extern int _g_longHTLength;
extern int _g_midHTLength;
extern int _g_shortHTLength;

extern int compareEntrySize(const void *a, const void *b);

#endif /* COMMON_H_ */
